<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>管理系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {:widget_st('layui','css')}
  {:widget_st('jq','js')}
  {:widget_st('layui','js')}  
  {:widget_st('common','js')} 

</head>
{:do_action('admin_head')}
<body>
  <div class="layui-fluid">
      <div class="layui-row layui-col-space15">
        <div class="layui-col-md8">
          <div class="layui-card">
            <div class="layui-card-header">信息</div>
            <div class="layui-card-body">
                <?php $form_widget = new \app\common\widget\FormPro();  ?>
                <form class="layui-form info_tj"  >
                <?php if(isset($res['id'])){ ?>
                  <input type="hidden" name="id" value="{$res.id}">
                  <input type="hidden" name="pid" value="{$res.pid}">
                  {$form_widget->form_input(['title'=>'名称','name'=>'name','data'=>$res['name'],'theme'=>1])|raw}
                  {$form_widget->form_textarea(['title'=>'描述','name'=>'summary','data'=>$res['summary'],'theme'=>1])|raw}
                  {$form_widget->form_input(['title'=>'链接','name'=>'url','data'=>$res['url'],'theme'=>1])|raw}
                  {$form_widget->filesystem_pic(['title'=>'图片','name'=>'pic','data'=>$res['pic'],'theme'=>2])|raw}
                  {$form_widget->form_input(['title'=>'排序','name'=>'sort','data'=>$res['sort'],'theme'=>1])|raw}
                  {$form_widget->form_select(['title'=>'方法','name'=>'action','data'=>$res['action'],'list_arr'=>$action_list,'theme'=>2])|raw}
                  {$form_widget->form_input(['title'=>'选中参数','name'=>'item_id','data'=>$res['item_id'],'theme'=>1])|raw}


                  {$form_widget->form_select(['title'=>'父类','name'=>'menu_pid','data'=>$res['menu_pid'],'id_t'=>'id', 'name_t'=>'name','list_arr'=>$plist,'theme'=>1])|raw}
                  {$form_widget->form_radio(['title'=>'状态','name'=>'status','data'=>$res['status'],'parm_data'=>['0'=>'关闭','1'=>'开启'],'theme'=>1])|raw}
                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <a class="layui-btn layui-btn-sm" onclick="tijiao_data('/admin/rests/menu_edit')" >提交</a>
                    </div>
                  </div>
                <?php }else{ ?>
                  <input type="hidden" name="pid" value="{$pid}">
                  {$form_widget->form_input(['title'=>'名称','name'=>'name','data'=>'','theme'=>1])|raw}
                  {$form_widget->form_textarea(['title'=>'描述','name'=>'summary','data'=>'','theme'=>1])|raw}
                  {$form_widget->form_input(['title'=>'链接','name'=>'url','data'=>'','theme'=>1])|raw}
                  {$form_widget->filesystem_pic(['title'=>'图片','name'=>'pic','data'=>'','theme'=>2])|raw}
                  {$form_widget->form_input(['title'=>'排序','name'=>'sort','data'=>'','theme'=>1])|raw}
                  {$form_widget->form_select(['title'=>'方法','name'=>'action','data'=>'','list_arr'=>$action_list,'theme'=>2])|raw}
                  {$form_widget->form_input(['title'=>'选中参数','name'=>'item_id','data'=>0,'theme'=>1])|raw}

                  {$form_widget->form_select(['title'=>'父类','name'=>'menu_pid','data'=>0,'id_t'=>'id', 'name_t'=>'name','list_arr'=>$plist,'theme'=>1])|raw}
                  {$form_widget->form_radio(['title'=>'状态','name'=>'status','data'=>1,'parm_data'=>['0'=>'关闭','1'=>'开启'],'theme'=>1])|raw}
                  
                  <div class="layui-form-item">
                    <div class="layui-input-block">
                      <a class="layui-btn layui-btn-sm" onclick="tijiao_data('/admin/rests/menu_add')" >提交</a>
                    </div>
                  </div>
                <?php }?>

              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
</body>
</html>
{:do_action('admin_js')}